SET(EXAMPLE_NAME "Vulkan-glTF-PBR")
SET(SOURCE main.cpp)
file(GLOB SHADERS "../data/shaders/*.vert" "../data/shaders/*.frag" "../data/shaders/*.comp" "../data/shaders/*.geom" "../data/shaders/*.tesc" "../data/shaders/*.tese")
source_group("Shaders" FILES ${SHADERS})

if(WIN32)
	add_executable(${EXAMPLE_NAME} WIN32 ${MAIN_CPP} ${SOURCE} ${SHADERS})
    target_link_libraries(${EXAMPLE_NAME} base backends ${Vulkan_LIBRARY} ${WINLIBS} ${DRACO_LIBRARY})
elseif(APPLE)
    add_executable(${EXAMPLE_NAME} ${MAIN_CPP} ${SOURCE} ${SHADERS})
    target_link_libraries(${EXAMPLE_NAME} base backends ${DRACO_LIBRARY})
elseif(LINUX)
    add_executable(${EXAMPLE_NAME} ${MAIN_CPP} ${SOURCE} ${SHADERS})
    target_link_libraries(${EXAMPLE_NAME} base backends ${DRACO_LIBRARY})
endif()

SET(GLTF_NAME "glTF-PBR")
SET(SOURCE gltf_pbr.cpp gltf_render.cpp)
file(GLOB SHADERS "../data/shaders/*.vert" "../data/shaders/*.frag" "../data/shaders/*.comp" "../data/shaders/*.geom" "../data/shaders/*.tesc" "../data/shaders/*.tese")
source_group("Shaders" FILES ${SHADERS})

if(WIN32)
	add_executable(${GLTF_NAME} WIN32 ${MAIN_CPP} ${SOURCE} ${SHADERS})
    target_link_libraries(${GLTF_NAME} base backends ${Vulkan_LIBRARY} ${WINLIBS} ${DRACO_LIBRARY})
elseif(APPLE)
    add_executable(${GLTF_NAME} ${MAIN_CPP} ${SOURCE} ${SHADERS})
    target_link_libraries(${GLTF_NAME} base backends ${DRACO_LIBRARY})
elseif(LINUX)
    add_executable(${GLTF_NAME} ${MAIN_CPP} ${SOURCE} ${SHADERS})
    target_link_libraries(${GLTF_NAME} base backends ${DRACO_LIBRARY})
endif()


if(RESOURCE_INSTALL_DIR)
	install(TARGETS ${EXAMPLE_NAME} DESTINATION ${CMAKE_INSTALL_BINDIR})
endif()